package com.eduadmin.service;

import com.eduadmin.entity.TotalDivide;
import com.eduadmin.mapper.TotalDivideMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author zlc001
 * */
@Service
public class TotalDivideServiceImpl implements ITotalDivideService{
    private final TotalDivideMapper totalDivideMapper;
@Autowired
    public TotalDivideServiceImpl(TotalDivideMapper totalDivideMapper) {
        this.totalDivideMapper = totalDivideMapper;
    }
    @Override
    public int batchInsert(List<TotalDivide> totalDivideList){
        totalDivideMapper.batchInsert(totalDivideList);
        return 1;
    }
    public List<TotalDivide> getQueTotalDivideByParams(Map<String,Object> paraMap){
        return totalDivideMapper.getQueTotalDivideByParams(paraMap);
    }
    public int deleteByParams(Map<String,Object> paraMap){
        totalDivideMapper.deleteByParams(paraMap);
        return 1;
    }
    // 按条件(带分页条件)查询总分一分段记录，返回对象列表
    public int getQueTotalDivideNumberByParams(Map<String,Object> paraMap){
       return totalDivideMapper.getQueTotalDivideNumberByParams(paraMap);
    }

    public List<TotalDivide> getQueTotalDivideForChartsByParams(Map<String,Object> paraMap){
        return totalDivideMapper.getQueTotalDivideForChartsByParams(paraMap);
    }
}
